package com.yunshang.shoppingmall.mapper;

import com.yunshang.shoppingmall.entity.ProductComment;
import com.yunshang.shoppingmall.entity.ProductGuiGe;
import com.yunshang.shoppingmall.entity.ProductPrice;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
@Mapper
public interface ProductPriceMapper {
    int deleteByPrimaryKey(Integer priceId);
    //添加商品价格
    int insert(ProductPrice productPrice);

    int insertSelective(ProductPrice record);

    ProductPrice selectByPrimaryKey(Integer priceId);

    int updateByPrimaryKeySelective(ProductPrice record);

    int updateByPrimaryKey(ProductPrice record);

    //根据商品id查询价格

    List<ProductPrice> selectProductPriceByProId(@Param("productId") int productId);

    //根据规格id查询价格
     ProductPrice selectProductPriceByGuigeId(@Param("guigeId") int guigeId);

    //根据查询价格
    ProductPrice selectProductPriceByYZDianzhu(@Param("YZDianzhu") int YZDianzhu);

    //当规格Id查询价格为空时候，根据商品Id查询查询价格
    ProductPrice selectPriceByProductId(@Param("productId") int productId);

}